package com.aree.caipiao.shsq.model;

import com.aree.caipiao.shsq.util.ShuangSeQiuUtil;

/**
 * 双色球投注号码
 * 
 * @author hp-pc
 * 
 */
public class ShuangSeQiuNumbers {
	
	public ShuangSeQiuNumbers() {}
	
	public ShuangSeQiuNumbers(int red1, int red2, int red3, int red4, int red5, int red6, int blue) {
		this.red1 = red1;
		this.red2 = red2;
		this.red3 = red3;
		this.red4 = red4;
		this.red5 = red5;
		this.red6 = red6;
		this.blue = blue;
	}
	/**
	 * 返回和值
	 * @return
	 */
	public int getHe() {
		return this.getBlue() + this.getRed1() + this.getRed2() + this.getRed3() + this.getRed4() + this.getRed5() + this.getRed6();
	}
	/**
	 * 返回红球数组
	 * @return
	 */
	public int[] getReds() {
		return new int[] {red1, red2, red3, red4, red5, red6};
	}
	
	/**
	 * 返回号码数组
	 * @return
	 */
	public int[] getNumbers() {
		return new int[] {red1, red2, red3, red4, red5, red6, blue};
	}
	
	@Override
	public String toString() {
		String spliter = " ";
		StringBuffer buf = new StringBuffer("红球：");
		buf.append(ShuangSeQiuUtil.len2(red1)).append(spliter).append(ShuangSeQiuUtil.len2(red2)).append(spliter);
		buf.append(ShuangSeQiuUtil.len2(red3)).append(spliter).append(ShuangSeQiuUtil.len2(red4)).append(spliter);
		buf.append(ShuangSeQiuUtil.len2(red5)).append(spliter).append(ShuangSeQiuUtil.len2(red6)).append(spliter);
		buf.append(" 蓝球：").append(ShuangSeQiuUtil.len2(blue));
		return buf.toString();
	}
	private int red1;
	private int red2;
	private int red3;
	private int red4;
	private int red5;
	private int red6;
	private int blue;

	public int getRed1() {
		return red1;
	}

	public void setRed1(int red1) {
		this.red1 = red1;
	}

	public int getRed2() {
		return red2;
	}

	public void setRed2(int red2) {
		this.red2 = red2;
	}

	public int getRed3() {
		return red3;
	}

	public void setRed3(int red3) {
		this.red3 = red3;
	}

	public int getRed4() {
		return red4;
	}

	public void setRed4(int red4) {
		this.red4 = red4;
	}

	public int getRed5() {
		return red5;
	}

	public void setRed5(int red5) {
		this.red5 = red5;
	}

	public int getRed6() {
		return red6;
	}

	public void setRed6(int red6) {
		this.red6 = red6;
	}

	public int getBlue() {
		return blue;
	}

	public void setBlue(int blue) {
		this.blue = blue;
	}

}
